﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    abstract class NPC
    {
        private String _NpcNmae;
        public string NpcName { get => this._NpcNmae; set => this._NpcNmae = value; }

        private NpcType _NpcType;

        public NpcType NpcType { get => this._NpcType; set => this._NpcType = value; }
        public NPC()
        {

        }
        public NPC(String npcname,NpcType npctype)
        {
            this.NpcName = npcname;
            this.NpcType = npctype;
        }
        public abstract void Speak();
    }
    class Task : NPC
    {
        private String _TaskInfo;
        public string TaskInfo { get => this._TaskInfo; set => this._TaskInfo = value; }

        public Task(String npcname, NpcType npctype, String TaskInfo) : base(npcname, npctype)
        {
            this.TaskInfo = TaskInfo;
        }
        public override void Speak()
        {
            Console.WriteLine("我是{0}，{1}，你要不要？",base.NpcName,this.TaskInfo);
        }
    }
    class Shop : NPC
    {
        private String _ShopInfo;
        public string ShopInfo { get => this._ShopInfo; set => this._ShopInfo = value; }
        public Shop(String npcname, NpcType npctype, String ShopInfo) : base(npcname, npctype)
        {
            this.ShopInfo = ShopInfo;
        }
        public override void Speak()
        {
            Console.WriteLine("我是{0}，我这有{1}，你要不要？", base.NpcName,this.ShopInfo);
        }
    }
    class Iron : NPC {
        private String _IronInfo;
        public string IronInfo { get => this._IronInfo; set => this._IronInfo = value; }
        public Iron(String npcname, NpcType npctype, String IronInfo) : base(npcname, npctype)
        {
            this.IronInfo = IronInfo;
        }
        public override void Speak()
        {
            Console.WriteLine("我是{0}，我这能打造{1}，你要不要？", base.NpcName,this.IronInfo);
        }
    }
}
